{extend name="layout/index" /}
{block name="title"}
<title>修改视频</title>
{/block}
{block name="adminUser"}
<a href="#" data-toggle="dropdown">
	<img src="/admin/images/user-4.png" alt="user-image" class="img-circle img-inline userpic-32" width="28" />
	<span>
		{$adminUser}
		<i class="fa-angle-down"></i>
	</span>
</a>
{/block}
{block name="content"}
		<div class="panel panel-default">
						<div class="panel-heading">
							<h3 class="panel-title">修改视频</h3>
							<div class="panel-options">
								<a href="#" data-toggle="panel">
									<span class="collapse-icon">&ndash;</span>
									<span class="expand-icon">+</span>
								</a>
								<a href="#" data-toggle="remove">
									×
								</a>
							</div>
						</div>
						<div class="panel-body">
							
							<form action="{:url('admin/doBookVideoEdit')}" method="post" enctype="multipart/form-data" role="form" class="form-horizontal">
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="field-1">图片标题</label>
									
									<div class="col-sm-10">
										<input class="form-control" id="field-1" placeholder="输入视频标题" type="text" name="video_name" value="{$video.video_name}">
									</div>
								</div>								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="field-4">图片</label>
									
									<div class="col-sm-10">
										<input class="form-control" id="field-4" type="file" name="video_zip">
									</div>
								</div>

									<div class="form-group-separator"></div>

								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="field-5">图片描述</label>
									
									<div class="col-sm-10">
										<textarea name="video_describe" value="{$video.video_describe}" class="form-control autogrow" cols="5" id="field-5" placeholder="" style="overflow: hidden; overflow-wrap: break-word; resize: horizontal;  height: 68px;"></textarea>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="field-1">设置时间</label>
									
									<div class="col-sm-10">
										<input class="form-control" id="field-1" type="text" name="set_time" value="{$video.set_time}">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">分类名称</label>
										<div class="col-sm-10">
										<select name="cate_id" class="form-control">
											<option  value="0">--请选择--</option>
											{foreach name="cates" id="vo"}
											<option {if condition="$video.cate_id == $vo.id"} selected {/if} value="{$vo.id}">--{$vo.name}--</option>
											{/foreach}
										</select>
									</div>
								</div>
								
									<div class="form-group-separator"></div>
								
								<input type="hidden" name="id" value="{$video.id}">
								<input type="submit" value="点击修改" class="btn btn-info btn-single pull-right"/>
							</form> 
							
						</div>
					</div>

{/block}

{block name="css"}


{/block}

{block name="js"}
<script type="text/javascript">
$('select[name=video_style]').change(function(){
	var v = $(this).val();	
	if(v == 2){
		$('.video_price').css('display','block');
	}else{
		$('.video_price').css('display','none');
	}
	if(v == 3){
		$('.video_jifen').css('display','block');
	}else{
		$('.video_jifen').css('display','none');
	}
})
</script>
{/block}
